package com.bharatonjava.stump.service;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bharatonjava.stump.dao.EmployeeDao;
import com.bharatonjava.stump.domain.Employee;

@Service
public class EmployeeService {
	
	@Autowired
	private EmployeeDao employeeDao;
	
	public void setEmployeeDao(EmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}
	
	@Transactional
	public Long saveEmployee(Employee employee) {
		return employeeDao.saveEmployee(employee);
	}
	
	@Transactional
	public List<Employee> getEmployees() {
		return employeeDao.getEmployees();
	}
}
